<html>
<head>
<style type='text/css'>
body {
   background-color: white;
   margin: 1em 2em 1em 2em;
   font-family: Sans-Serif;
   color: #002;
   line-height: 140%;
   font-size: 12px;
}

h4 {
    font-size: 100%;
    font-style: normal;
    font-weight: bold;
}

h5 {
    font-size: 100%;
    font-style: italic;
    font-weight: normal;
}

pre {
   background-color: #eee;
   padding: 0.5em 0.5em 0.5em 2em;
}

@media print {
   pre {word-wrap:break-word; width:100%;}
} 

ul li,
ol li {
   padding-left: 0.3em;
   /*text-indent: -2em;*/
   margin-bottom: 0.5em;
}

em {
   font-style: normal;
   font-weight: bold;
   text-decoration: underline;
   color: #c40;
}

code {
   font-family: Monospace;
   font-size: 100%;
   color: #c40;
}

a, a * {
   text-decoration: underline;
   color: blue;
   /* border: 0.5px solid #aaa;
   white-space: nowrap;
   padding-right: 0.1em;
   padding-left: 0.1em;
   padding-bottom: -5px; */
}

a code {
   color: blue;
}

img {
   position: relative;
   bottom: -4px;
}

div.headline {
   font-weight: bold;
   font-size: 110%;
}

div.copyright {
   margin-top: 1em;
   border-top: 1px solid black;
   padding-top: 0.5em;
}

div.iris_headline {
   border-bottom: 1px solid black;
   padding-bottom: 0.3em;
}

.LaTeX {
   font-family: Monospace;
   font-size: 100%;
   border: 1px solid #060;
   color: #060;
}

code.LaTeX {
   background-color: white;
   padding: 0.5em 0.5em 0.5em 2em;
}
</style>
</head>

<body>
<div class="iris_headline">IRIS Toolbox Reference Manual</div>




<h2 id="report/matrix">matrix</h2>
<div class="headline">Insert matrix or numeric array</div>

<h4 id="syntax">Syntax</h4>
<pre><code>P.matrix(Caption,Data,...)</code></pre>
<h4 id="input-arguments">Input arguments</h4>
<ul>
<li><p><code>P</code> [ struct ] - Report object created by the <a href="../report/new.html"><code>report.new</code></a> function.</p></li>
<li><p><code>Caption</code> [ char | cellstr ] - Title or a cell array with title and subtitle displayed at the top of the matrix; see Description for splitting the title or subtitle into multiple lines.</p></li>
<li><p><code>Data</code> [ numeric ] - Numeric array with input data.</p></li>
</ul>
<h4 id="options">Options</h4>
<ul>
<li><p><code>'arrayStretch='</code> [ numeric | <em><code>1.15</code></em> ] - (Inheritable from parent objects) Stretch between lines in the matrix (in pts).</p></li>
<li><p><code>'captionTypeface='</code> [ cellstr | char | *'] - <br />format commands for typesetting the matrix caption; the subcaption format can be entered as the second cell in a cell array.</p></li>
<li><p><code>'colNames='</code> [ cellstr | <em>empty</em> ] - (Inheritable from parent objects) Names for individual matrix columns, displayed at the top of the matrix.</p></li>
<li><p><code>'colWidth='</code> [ numeric | <em><code>NaN</code></em> ] - (Inheritable from parent objects) Width, or a vector of widhts, of the matrix columns in <code>em</code>units; <code>NaN</code> means the width of the column will adjust automatically.</p></li>
<li><p><code>'condFormat='</code> [ struct | <em>empty</em> ] - (Inheritable from parent objects) Structure with .test and .format fields describing conditional formatting of individual matrix entries.</p></li>
<li><p><code>'footnote='</code> [ char | <em>empty</em> ] - Footnote at the matrix title; only shows if the title is non-empty.</p></li>
<li><p><code>'format='</code> [ char | <em><code>'%.2f'</code></em> ] - (Inheritable from parent objects) Numeric format string; see help on the built-in <code>sprintf</code> function.</p></li>
<li><p><code>'heading='</code> [ char | <em>empty</em> ] - (Inheritable from parent objects) User-supplied heading, i.e. an extra row or rows at the top of the matrix.</p></li>
<li><p><code>'inf='</code> [ char | <em><code>'$\infty$'</code></em> ] - (Inheritable from parent objects)  string that will be used to typeset Infs.</p></li>
<li><p><code>'long='</code> [ <code>true</code> | <em><code>false</code></em> ] - (Inheritable from parent objects) If <code>true</code>, the matrix may stretch over more than one page.</p></li>
<li><p><code>'longFoot='</code> [ char | <em>empty</em> ] - (Inheritable from parent objects) Works only with <code>'long='</code> <code>true</code>: Footnote that appears at the bottom of the matrix (if it is longer than one page) on each page except the last one.</p></li>
<li><p><code>'longFootPosition='</code> [ <code>'centre'</code> | <em><code>'left'</code></em> | <code>'right'</code> ] - (Inheritable from parent objects) Works only with <code>'long='</code> <code>true</code>: Horizontal alignment of the footnote in long matrices.</p></li>
<li><p><code>'nan='</code> [ char | <em><code>'$\cdots$'</code></em> ] - (Inheritable from parent objects)  string that will be used to typeset <code>NaN</code>s.</p></li>
<li><p><code>'pureZero='</code> [ char | <em>empty</em> ] - (Inheritable from parent objects)  string that will be used to typeset pure zero entries; if empty the zeros will be printed using the current numeric format.</p></li>
<li><p><code>'printedZero='</code> [ char | <em>empty</em> ] - (Inheritable from parent objects)  string that will be used to typeset the entries that would appear as zero under the current numeric format used; if empty these numbers will be printed using the current numeric format.</p></li>
<li><p><code>'rotateColNames='</code> [ <em><code>true</code></em> | <code>false</code> | numeric ] - Rotate the names of columns by the specified number of degrees; <code>true</code> means rotate by 90 degrees.</p></li>
<li><p><code>'rowNames='</code> [ cellstr | <em>empty</em> ] - (Inheritable from parent objects) Names fr individual matrix rows, displayed left of the matrix.</p></li>
<li><p><code>'separator='</code> [ char | <em><code>'\medskip\par'</code></em> ] - (Inheritable from parent objects)  commands that will be inserted after the matrix.</p></li>
<li><p><code>'sideways='</code> [ <code>true</code> | <em><code>false</code></em> ] - (Inheritable from parent objects) Print the matrix rotated by 90 degrees.</p></li>
<li><p><code>'tabcolsep='</code> [ <code>NaN</code> | numeric ] - (Inheritable from parent objects) Space between columns in the matrix, measured in em units; <code>NaN</code> means the  default.</p></li>
<li><p><code>'typeface='</code> [ char | <em>empty</em> ] - (Not inheritable from parent objects)  code specifying the typeface for the matrix as a whole; it must use the declarative forms (such as <code>\itshape</code>) and not the command forms (such as <code>\textit{...}</code>).</p></li>
</ul>
<h4 id="generic-options">Generic options</h4>
<p>See help on <a href="../report/Contents.html">generic options</a> in report objects.</p>
<h4 id="description">Description</h4>
<h5 id="conditional-formatting">Conditional formatting</h5>
<p>The conditional format struct (or an array of structs) specified through the <code>'condFormat='</code> option must have two fields, <code>.test</code> and <code>.format</code>.</p>
<p>The <code>.test</code> field is a text string with a Matlab expression. The expression must evaluate to a scalar <code>true</code> or <code>false</code>, and can refer to the following attributes associated with each entry in the data part of the matrix:</p>
<ul>
<li><code>value</code> - the numerical value of the entry;</li>
<li><code>row</code> - the row number within the data part of the matrix;</li>
<li><code>col</code> - the column number within the data part of the matrix;</li>
<li><code>rowname</code> - the row name right of which the entry appears;</li>
<li><code>colname</code> - the column name under which the entry appears;</li>
<li><code>rowvalues</code> - a row vector of all values in the current row;</li>
<li><code>colvalues</code> - a column vector of all values in the current column;</li>
<li><code>allvalues</code> - a matrix of all values.</li>
</ul>
<p>You can combine a number of attribues within one test, using the logical operators, e.g.</p>
<pre><code>value &gt; 0 &amp;&amp; row &gt; 3
value == max(rowvalues) &amp;&amp; strcmp(rowname,&#39;x&#39;)</code></pre>
<p>The <code>.format</code> fields of the conditional format structure consist of LaTeX commands that will be use to typeset the corresponding entry. The reference to the entry itself is through a question mark. The entries are typeset in math mode; this for instance meanse that for bold or italic typface, you must use the <code>\mathbf{...}</code> and <code>\mathit{...}</code> commands.</p>
<p>In addition to standard LaTeX commands, you can use the following IRIS commands in the format strings:</p>
<ul>
<li><code>\sprintf{FFFF}</code> - to modify the way each numeric entry that passes the test is printed by the <code>sprintf</code> function; <code>FFFF</code> is one of the standard sprintf formattting strings.</li>
</ul>
<p>You can combine multiple tests and their correponding formats in one structure; they will be all applied to each entry in the specified order.</p>
<h5 id="titles-and-subtitles">Titles and subtitles</h5>
<p>The input argument <code>Caption</code> can be either a text string, or a 1-by-2 cell array of strings. In the latter case, the first cell will be printed as a title, and the second cell will be printed as a subtitle.</p>
<p>To split the title or subtitle into multiple lines, use the following LaTeX commands wrapped in curly brackets: <code>{\\}</code> or <code>{\\[Xpt]}</code>, where <code>X</code> is the width of an extra vertical space (in points) added between the respective lines.</p>
<h4 id="example">Example</h4>

</body>
<div class="copyright">IRIS Toolbox. Copyright &copy; 2007&#8212;2012 Jaromir Benes.</div>
</html>
